package org.sixtynine.stock.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "DIVIDEND")
public class Dividend extends BaseEntity {

	private int id;
	private double dividedPShare;
	private double adjDividedPShare;
	private String rightsIssues;
	private String stockSplits;
	private String bonusIssues;

	private Date date;

	private Company company;

	public Dividend() {
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "DIVIDENT_PSHARE")
	public double getDividedPShare() {
		return dividedPShare;
	}

	public void setDividedPShare(double dividedPShare) {
		this.dividedPShare = dividedPShare;
	}

	@Column(name = "ADJ_DIVIDENT_PSHARE")
	public double getAdjDividedPShare() {
		return adjDividedPShare;
	}

	public void setAdjDividedPShare(double adjDividedPShare) {
		this.adjDividedPShare = adjDividedPShare;
	}

	@Column(name = "DATE")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@ManyToOne
	@JoinColumn(name = "COMPANY_ID")
	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@Column(name = "RIGHTS_ISSUE")
	public String getRightsIssues() {
		return rightsIssues;
	}

	public void setRightsIssues(String rightsIssues) {
		this.rightsIssues = rightsIssues;
	}

	@Column(name = "STOCK_SPLITS")
	public String getStockSplits() {
		return stockSplits;
	}

	public void setStockSplits(String stockSplits) {
		this.stockSplits = stockSplits;
	}

	@Column(name = "BONUS_ISSUES")
	public String getBonusIssues() {
		return bonusIssues;
	}

	public void setBonusIssues(String bonusIssues) {
		this.bonusIssues = bonusIssues;
	}

}
